<%@ page import="hotsaucerecipes.Review" %>



<div class="fieldcontain ${hasErrors(bean: reviewInstance, field: 'title', 'error')} required">
    <label for="title">
        <g:message code="review.title.label" default="Title"/>
        <span class="required-indicator">*</span>
    </label>
    <g:textField name="title" maxlength="100" required="" value="${reviewInstance?.title}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reviewInstance, field: 'rating', 'error')} required">
    <label for="rating">
        <g:message code="review.rating.label" default="Rating"/>
        <span class="required-indicator">*</span>
    </label>
    <g:field type="number" name="rating" min="0" max="5" required=""
             value="${fieldValue(bean: reviewInstance, field: 'rating')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reviewInstance, field: 'comments', 'error')} ">
    <label for="comments">
        <g:message code="review.comments.label" default="Comments"/>

    </label>
    <g:textArea name="comments" cols="40" rows="5" maxlength="1000" value="${reviewInstance?.comments}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: reviewInstance, field: 'recipe', 'error')} required">
    <label for="recipe">
        <g:message code="review.recipe.label" default="Recipe"/>
        <span class="required-indicator">*</span>
    </label>
    <g:select id="recipe" name="recipe.id" from="${hotsaucerecipes.Recipe.list()}" optionKey="id" required=""
              value="${reviewInstance?.recipe?.id}" class="many-to-one"/>
</div>

